<template>
  <footer>
    <ul>
      <!--声明式导航，警告：tag属性在vue-router4之后被遗弃-->
      <!--
        <router-link to="/films" active-class="esnClass" tag="li">电影</router-link>
        <router-link to="/cinemas" active-class="esnClass" tag="li">影院</router-link>
        <router-link to="/center" active-class="esnClass" tag="li">我的</router-link> -->

      <router-link to="/home" custom v-slot="{ navigate, isActive }">
        <li @click="navigate" :class="isActive ? 'esnClass' : ''">
          <i class="iconfont icon--xiaogou"></i>
          <span>首页</span>
        </li>
      </router-link>
      <router-link to="/community" custom v-slot="{ navigate, isActive }">
        <li @click="navigate" :class="isActive ? 'esnClass' : ''">
          <i class="iconfont icon-jianzhu_o"></i>
          <span>社区</span>
        </li>
      </router-link>
      <router-link to="/center" custom v-slot="{ navigate, isActive }">
        <li @click="navigate" :class="isActive ? 'esnClass' : ''">
          <i class="iconfont icon-gerenzhongxin1"></i>
          <span>我的</span>
        </li>
      </router-link>
    </ul>
  </footer>
</template>
<script>
import '../assets/iconfont/iconfont.css'
export default {}
</script>
<style lang="scss" scoped>
footer {
  z-index: 100;
  position: fixed;
  bottom: 0;
  left: 0;
  background: white;
  height: 3.125rem;
  width: 100%;
  ul {
    display: flex;
    li {
      flex: 1;
      line-height: 1.5625rem;
      text-align: center;
      display: flex;
      flex-direction: column;
      .iconfont {
        font-size: 20px;
      }
    }
  }
}
.esnClass {
  color: red;
}
</style>
